﻿/**
* @author Alexander Rindo
* @project Flashview
* @version 0.4
* @purpose Class for the shareToolbar Movieclip
**/

package com.alexrindo.flashview.UI.share 
{
	import flash.display.MovieClip;
	
	public class ShareToolbar extends MovieClip
	{
		private var _twitterIcon:ShareIcon
		private var _diggIcon:ShareIcon
		private var _redditIcon:ShareIcon
		private var _facebookIcon:ShareIcon
		private var _stumbleuponIcon:ShareIcon
		private var _deliciousIcon:ShareIcon
		
		private var _icons:Array
		
		public function ShareToolbar() 
		{
			createIcons()
		}
		
		private function createIcons():void
		{
			_twitterIcon = new ShareIcon("Twitter")
			_diggIcon = new ShareIcon("Digg")
			_redditIcon = new ShareIcon("Reddit")
			_facebookIcon= new ShareIcon("Facebook")
			_stumbleuponIcon = new ShareIcon("Stumbleupon")
			_deliciousIcon = new ShareIcon("Delicious")
			_deliciousIcon.divider.visible = false
			
			_icons = new Array(_twitterIcon,_diggIcon,_redditIcon,_facebookIcon,_stumbleuponIcon,_deliciousIcon)
			_icons.forEach(addIcons)
		}
		
		private function addIcons(element:*, index:int, arr:Array):void
		{
			element.x = -25
			element.y = -493 + (index*80)
			addChild(element)
		}
		
	}

}